package cn.xinfei.xdecision.common.dao.component.scriptrule;

import cn.xinfei.xdecision.common.model.component.ComponentVo;
import cn.xinfei.xdecision.common.model.component.dependency.resp.DecisionComponentDependencyResp;
import cn.xinfei.xdecision.common.model.component.scriptrule.RuleScriptFieldRel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 脚本规则-变量依赖关系表
 */
@Mapper
public interface RuleScriptFieldRelMapper extends BaseMapper<RuleScriptFieldRel> {

    /**
     * 通过组件code和versionNo集合查询变量code
     *
     * @param componentVoList 组件code和versionNo集合
     */
    List<String> getFieldCodesByConditions(List<ComponentVo> componentVoList);


    /**
     * 通过变量code集合查询组件code
     *
     * @param varCodes 变量code集合
     */
    List<DecisionComponentDependencyResp> getComponentCodeByVarCodes(List<String> varCodes);
}

